package com.neiquan.backstage.convenience_service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.neiquan.backstage.common.util.ExtraSpringHibernateTemplate;
import com.neiquan.backstage.convenience_service.ConvenienceServiceService;
import com.neiquan.backstage.pub.bsc.dao.po.ConvenienceService;

@Service
public class ConvenienceServiceServiceImpl implements ConvenienceServiceService {
	private static Class<?> poc = ConvenienceService.class;
	@Autowired
	private ExtraSpringHibernateTemplate extraSpringHibernateTemplate;

	@Override
	public ConvenienceService queryById(Integer id) {
		return extraSpringHibernateTemplate.findFirstOneByPropEq(poc, "convenienceServiceId", id);
	}

	@Override
	public List<ConvenienceService> queryAll(int adminMemberId) {
		List<ConvenienceService> list=(List<ConvenienceService>) extraSpringHibernateTemplate.getHibernateTemplate().find("From ConvenienceService where memberId=?", adminMemberId);
		return list;
	}
	
}
